package com.kkb.service.impl;

import com.kkb.dao.AccountDao;
import com.kkb.pojo.Account;
import com.kkb.service.AccountService;

import java.util.List;

public class AccountServiceImpl implements AccountService {
    private AccountDao accountDao;

    public void setAccountDao(AccountDao accountDao) {
        this.accountDao = accountDao;
    }

    @Override
    public void addAccount(Account account) {
        this.accountDao.addAccount(account);
    }

    @Override
    public void deleteAccountById(Integer id) {
        this.accountDao.deleteAccountById(id);
    }

    @Override
    public void updateAccount(Account account) {
        this.accountDao.updateAccount(account);
    }

    @Override
    public Account findAccountById(Integer id) {
        return this.accountDao.findAccountById(id);
    }

    @Override
    public List<Account> findAccountsByName(String partName) {
        return this.accountDao.findAccountsByName(partName);
    }

    @Override
    public List<Account> findAllAccounts() {
        return this.accountDao.findAllAccounts();
    }
}
